Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.GetValueAsByteArray C# (CSharp) Метод

GetValueAsByteArray() публичный Метод

Reads value of attribute and returns it as byte array
public GetValueAsByteArray ( ) : byte[]
Результат byte[]
        public byte[] GetValueAsByteArray()
        {
            if (this._disposed)
                throw new ObjectDisposedException(this.GetType().FullName);

            byte[] value = null;
            CkaUtils.ConvertValue(ref _ckAttribute, out value);
            return value;
        }

Usage Example

        public void _02_EmptyAttributeTest()
        {
            if (Platform.UnmanagedLongSize != 8 || Platform.StructPackingSize != 0)
                Assert.Inconclusive("Test cannot be executed on this platform");

            // Create attribute without the value
            using (ObjectAttribute attr = new ObjectAttribute(CKA.CKA_CLASS))
            {
                Assert.IsTrue(attr.Type == (ulong)CKA.CKA_CLASS);
                Assert.IsTrue(attr.GetValueAsByteArray() == null);
            }
        }
All Usage Examples Of Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute::GetValueAsByteArray