diff --git a/der/src/asn1/octet_string.rs b/der/src/asn1/octet_string.rs index f30d3d07c..be57eda30 100644 --- a/der/src/asn1/octet_string.rs +++ b/der/src/asn1/octet_string.rs @@ -132,6 +132,11 @@ mod allocating { self.inner.as_slice() } + /// Take ownership of the octet string. + pub fn into_bytes(self) -> Vec { + self.inner + } + /// Get the length of the inner byte slice. pub fn len(&self) -> Length { self.value_len().expect("invalid OCTET STRING length")