mirror of
https://github.com/bitwarden/android.git
synced 2026-05-21 20:20:03 -05:00
16 lines
380 B
C#
16 lines
380 B
C#
using System.Runtime.InteropServices;
|
|
using Foundation;
|
|
|
|
namespace Bit.iOS.Core.Utilities
|
|
{
|
|
public static class NSDataExtensions
|
|
{
|
|
public static byte[] ToByteArray(this NSData data)
|
|
{
|
|
var bytes = new byte[data.Length];
|
|
Marshal.Copy(data.Bytes, bytes, 0, Convert.ToInt32(data.Length));
|
|
return bytes;
|
|
}
|
|
}
|
|
}
|