简体   繁体   English

不可读 - 杨

[英]Non readable - YANG

There is a way to define non readable data in yang?有没有办法在 yang 中定义非可读数据?

module system{
   leaf name{
      type string;
   }
   leaf password{
      type string;
   }
}

So in this case 'password' is the non readable data.所以在这种情况下,“密码”是不可读的数据。

If you wish to make the data "unreadable", you can use binary built-in type, which enables you to set an arbitrary blob of bytes (base64 encoded) as the value for a leaf.如果您希望使数据“不可读”,您可以使用binary内置类型,它使您能够将任意字节 blob(base64 编码)设置为叶的值。 Encrypted bytes included.包括加密字节。

leaf password {
  type binary;
  default "cGFzc3dvcmQ="; // <-- plain text "password"
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM