Ejemplo n.º 1
0
 KeychainSecret(
     KeychainSecretName name,
     byte [] value)
 {
     Name       = name;
     this.value = value;
 }
Ejemplo n.º 2
0
        public KeychainSecret WithName(KeychainSecretName name)
        {
            name.Assert(nameof(name));

            return(new KeychainSecret(
                       name,
                       value));
        }
Ejemplo n.º 3
0
        public static KeychainSecret Create(
            KeychainSecretName name,
            string value)
        {
            name.Assert(nameof(name));
            ArgumentAssert.IsNotNull(value, nameof(value));

            return(new KeychainSecret(
                       name,
                       value == null ? null : Keychain.Utf8.GetBytes(value)));
        }
Ejemplo n.º 4
0
        public static KeychainSecret Create(
            KeychainSecretName name,
            byte [] value)
        {
            name.Assert(nameof(name));
            ArgumentAssert.IsNotNull(value, nameof(value));

            return(new KeychainSecret(
                       name,
                       value));
        }
Ejemplo n.º 5
0
 public static bool TryGetSecret(KeychainSecretName name, out KeychainSecret secret)
 => keychain.TryGetSecret(name, out secret);