mirror of
https://github.com/rwinkhart/cmutton.git
synced 2026-08-28 04:46:46 -04:00
19 lines
437 B
Go
19 lines
437 B
Go
package main
|
|
|
|
// #include <stdlib.h>
|
|
// #include "types.h"
|
|
import "C"
|
|
import (
|
|
"unsafe"
|
|
|
|
"github.com/rwinkhart/libmutton/privkey"
|
|
)
|
|
|
|
// SetPrivKeyBytesAndFree forces libmutton to use custom bytes for the SSH private key.
|
|
//
|
|
//export SetPrivKeyBytesAndFree
|
|
func SetPrivKeyBytesAndFree(privKeyPascal C.PascalString) {
|
|
privkey.SetBytes(C.GoBytes(unsafe.Pointer(privKeyPascal.data), privKeyPascal.len))
|
|
FreePascalString(privKeyPascal)
|
|
}
|