活动介绍
file-type

Java版SM4加密算法实现:GMSSL-Java-SDK详细解析

ZIP文件

下载需积分: 50 | 6.65MB | 更新于2025-01-08 | 70 浏览量 | 6 评论 | 5 下载量 举报 1 收藏
download 立即下载
在现代信息安全领域中,数据加密技术扮演着至关重要的角色。GMSSL(即国密SSL)作为一套国产的加密算法库,提供了包括SM2、SM3和SM4在内的国密算法,而gmssl-java-sdk则是为Java语言提供了一套简便的接口,用于调用这些国密算法。 首先,该资源主要围绕Java语言实现的SM4加密算法的源码进行介绍。SM4是一种分组对称加密标准算法,广泛应用于加密和解密数据保护,特别是在我国信息安全领域。在本项目中,GMSSL库作为一个基础支撑,实现了SM4算法的加密和解密功能,同时为Java开发者提供了一套简洁的接口。 项目特点包括: 1. 提供了生成SM2密钥对的方法,这是另一套国密算法,用于公钥加密和数字签名,同时也支持生成符合DER和PEM格式的SM2公私钥文件。 2. 实现了公私钥文件在PEM格式和DER格式之间的转换,增强了密钥管理的灵活性。 3. GmSSL.c文件中实现了JNI(Java Native Interface)接口,这样Java代码可以调用底层的C语言库,直接使用SM2、SM3、SM4等加密算法。 4. 简易封装了SM2、SM3、SM4算法,使得Java开发者可以在Java层面上方便地使用这些国密算法。 另外,资源中提到了一个lib目录,包含了Linux和Windows 10 x64平台上的预编译动态链接库(so文件和dll文件)。开发者可以直接将这些库文件导入到项目中使用。如果预编译版本不适用,或者需要进行定制化开发,资源中也提供了Linux平台下的编译指南。 编译过程大致如下: 1. 下载并解压GMSSL源码到工作目录。 2. 使用`./config`命令进行配置,设置安装路径,并指定只编译静态库以保证与OpenSSL的兼容性。 3. 执行`make`和`make install`进行编译安装。 4. 配置环境变量,确保系统可以找到GMSSL库。 这个资源的关键点在于它为Java开发者提供了一个工具集,使得他们可以轻松地在Java项目中集成并使用SM2、SM3、SM4等国密算法,从而在遵循国家密码管理政策的同时,为应用提供必要的数据安全和隐私保护功能。这对于需要遵循中国国家密码法规的应用程序来说至关重要。 在技术实现层面,gmssl-java-sdk不仅简化了开发者的工作流程,还展示了如何利用JNI技术在Java环境中调用C语言实现的功能。对于希望深入理解Java与本地代码交互的开发者,这个资源是一个很好的学习案例。同时,这个项目也表明了开源社区在支持特定国家的密码算法标准方面所扮演的角色,特别是在数据安全日益受到重视的今天。 对于准备或已经开始在Java项目中集成国密算法的开发者来说,该资源无疑提供了一个很好的起点,可以大大提高开发效率和安全性。在不断变化的技术环境中,掌握这些知识对于任何希望在信息安全领域保持竞争力的开发者都是必不可少的。

相关推荐

filetype

event: "tap_share" 07-31 10:23:54.420479 24286 24306 D PTC.SERVICE.DependSettingValueProxy: getSettingsState, settingKeytouch_interactions_support , value = 1 07-31 10:23:54.420488 24286 24306 D PTC.SERVICE.Util: getTouchInteractionsSupport, already support 07-31 10:23:54.420558 24286 24306 D PTC.SERVICE.NfcEventRepository: -- NFC-DISC -- unregister share agent success: ShareAgent(agentId=220123242, pkg=com.coloros.gallery3d, pid=14486, appName=相册, callback=h00.p<java.lang.String, byte[], java.lang.Boolean>) 07-31 10:23:54.420601 24286 24306 D PTC.DEVICEMGR.LocalDeviceInfoProcessorImpl: getLocalDeviceInfoInTime 07-31 10:23:54.420668 24286 24306 D PTC.DEVICEMGR.LocalDeviceInfoCollector: collectDeviceInfo, deviceInfo: deviceType: PHONE, metaData: DeviceMetaData(deviceID='*(60)6923', protocolDeviceId='*(8)F47B', deviceModel=RMX3800),resourceModelId=null), spec: DeviceSpec(deviceName=**3800, resolution=1264*2780, screenDpi=560, cpuName=SM8650, ramSpec=16.00, romSpec=512.00, batteryCapacity=5800.0, bdMac=, androidVersion=36, osVersion=37, brand=realme, region=zh-CN, marketName=RMX3800, oaid='), status: DeviceStatus(connectionToMajor=null, btStatus=0, networkType=WIFI, wifiStatus=1, wifiApStatus=0, p2pStatus=0, d2dStatus=1, locationStatus=1, memAvail=7613.7305, memTotal=15204.164, storageAvail=473296.34, darkMode=0, earPhone=0, supportResumeSenselessStatus=1) 07-31 10:23:54.420703 24286 24306 D PTC.DISC.LocalDeviceId: localProtocolDeviceId, get from cached: *(8)F47B 07-31 10:23:54.420731 24286 24306 D PTC.DISC.DiscCoreImpl: getLocalProtocolDeviceId, byte:*(8)F47B,string: *(8)F47B 07-31 10:23:54.420738 24286 24306 D PTC.DISC.LocalDeviceId: localProtocolDeviceId, get from cached: *(8)F47B 07-31 10:23:54.420746 24286 24306 D PTC.DEVICEMGR.DeviceIdGenerator: LocalProtocolDeviceId: *(8)F47B 07-31 10:23:54.420878 24286 24306 D BluetoothAdapter: 116324037: getState(). Returning OFF 07-31 10:23:54.420905 24286 24306 W PTC.DEVICEMGR.DeviceInfoCollectUtil: Bluetooth not enable! 07-31 10:23:54.421093 24286 24306 D BluetoothAdapter: 116324037: getState(). Returning OFF 07-31 10:23:54.421239 14486 14486 D BaseFragment: onDestroyView: <PhotoFragment@150650726> 07-31 10:23:54.421760 14486 14486 D PhotoPageManagementViewModel: [notifyChangeWindowRefreshRate] request=REQUEST_DEFAULT 07-31 10:23:54.422898 14486 14486 D HomeRecentListener: unRegister: 07-31 10:23:54.423034 14486 14486 I OplusAppSwitchManager: unRegisterAppSwitchObserver observer = com.oplus.gallery.photo_page.ui.PhotoFragment$GalleryAppSwitchObserver@1c3a030 07-31 10:23:54.423290 3282 5547 I OplusAppSwitchManagerService: appswitch unregisterAppSwitchObserver pkgName = com.coloros.gallery3d_208266697 config = OplusAppSwitchConfig = { mConfigs = {} observerFingerPrint = 29597744} 07-31 10:23:54.423349 3282 5547 I OplusAppSwitchStateDispatcher: unregisterAppSwitchObserver ok, pkgName = com.coloros.gallery3d info = OplusAppSwitchRuleInfo = { observer = null observerFingerPrint = 29597744} 07-31 10:23:54.423960 14486 14486 I WorkerSession: terminal: method is called it will cancel WorkerSession(PhotoViewModel): 0 works. 07-31 10:23:54.424014 14486 14486 I WorkerSession: clear: method is called it will cancel WorkerSession(PhotoViewModel): 0 works. 07-31 10:23:54.424051 14486 14486 D SessionStack: remove: PrioritySession() WorkerSession(isTerminated=true, size=0, runningSize=0, limitSize=4) Session(name=PhotoViewModel, tag='986a8a2a-b5de-40ca-833e-853fa6860e92') 07-31 10:23:54.424069 14486 14486 I WorkerSession: terminal: method is called it will cancel WorkerSession(PhotoViewModel#Decode): 0 works. 07-31 10:23:54.424074 14486 14486 I WorkerSession: clear: method is called it will cancel WorkerSession(PhotoViewModel#Decode): 0 works. 07-31 10:23:54.424087 14486 14486 D SessionStack: remove: PrioritySession() WorkerSession(isTerminated=true, size=0, runningSize=0, limitSize=4) Session(name=PhotoViewModel#Decode, tag='d7e62a7a-62e4-472b-8d7e-2336ae6911cc') 07-31 10:23:54.424208 14486 14486 I Paging.GalleryPaging: [close] close paging 07-31 10:23:54.424229 14486 14486 I Paging.LoaderRequestHandler: [close] handler closed 07-31 10:23:54.424242 14486 14486 I Paging.PagingPipeline: [close] close pipeline 07-31 10:23:54.424254 14486 14486 I Paging.PagingStage: [close] close stage 07-31 10:23:54.424264 14486 14486 I Paging.LoadingStage: [close] close stage 07-31 10:23:54.424274 14486 14486 I Paging.DiffStage: [close] close stage 07-31 10:23:54.424283 14486 14486 I Paging.NotifyingStage: [close] close stage 07-31 10:23:54.424296 14486 14486 I Paging.PagingCacheManager: [clear] clear cache 07-31 10:23:54.424307 14486 14486 I Paging.SegmentCircularArray: [clear]clear data 07-31 10:23:54.424459 14486 14486 D AsyncContentFactory: [release] 07-31 10:23:54.425497 24286 24306 D AudioManager: isBluetoothScoOn()=false, calling application:com.heytap.accessory 07-31 10:23:54.426127 14486 14486 D LruBitmapPool: <tile>clearMemory 07-31 10:23:54.426149 14486 14486 D TileTaskDispatcher: release. 07-31 10:23:54.426359 14486 14486 D PhotoLocalPlaybackControl: [clearCurrentPlayer] current=com.oplus.gallery.standard_lib.codec.player.AVController$a$a@78f5c72, expect=null 07-31 10:23:54.426441 14486 14486 D PhotoPlaybackViewModel: [launchUpdatePlaybackInfoTask] task exists, skip 07-31 10:23:54.426463 14486 22262 D TileDrawable 130944505: release 07-31 10:23:54.426564 14486 22262 D PhotoTileAdapter: release, id=/local/item/image/72 07-31 10:23:54.426625 14486 22263 D TileDrawable 92102551: release 07-31 10:23:54.426728 14486 14486 W NetworkMonitor: removeListener fail, java.lang.IllegalArgumentException: removeListener fail com.oplus.gallery.standard_lib.util.network.NetworkMonitor$i.invoke(NetworkMonitor.kt:2) com.oplus.gallery.standard_lib.util.network.NetworkMonitor$i.invoke(NetworkMonitor.kt:1) com.oplus.aiunit.vision.q44.invoke(DefaultLogger.kt:2) com.oplus.aiunit.vision.q44.invoke(DefaultLogger.kt:1) com.oplus.aiunit.vision.vr9.e(LogcatChannel.kt:11) com.oplus.aiunit.vision.a44.c(DefaultLogger.kt:95) com.oplus.aiunit.vision.rq6.H(GLog.kt:14) com.oplus.gallery.standard_lib.util.network.NetworkMonitor.f(NetworkMonitor.kt:20) com.oplus.aiunit.vision.mqc.e(PhotoCloudSyncViewModel.kt:118) com.oplus.gallery.foundation.arch.sectionpage.SectionViewModelSetManager.a(PageViewModel.kt:27) 07-31 10:23:54.426930 14486 22263 D PhotoTileAdapter: release, id=/local/item/image/69 07-31 10:23:54.427243 14486 14486 D PhotoBgTaskDispatcher: release 07-31 10:23:54.427384 14486 14486 D PhotoDetailsTimeCardView: onStateChanged source PhotoFragment{8fabf66} (0c532ff2-9d65-4a69-8059-971989324cd7 id=0x7f0a0466 tag=com.oplus.gallery.photo_page.ui.PhotoFragment), event: ON_DESTROY, this PhotoDetailsTimeCardView@115120931 07-31 10:23:54.427417 14486 14486 D MapPageManager: onDestroy mapWrapperId 07-31 10:23:54.427443 14486 14486 D PhotoDetailsTimeCardView: unregisterLifecycle lifecycle androidx.lifecycle.LifecycleRegistry@a34fc52, this: PhotoDetailsTimeCardView@115120931 07-31 10:23:54.427609 14486 17310 D TileDrawable 244365751: release 07-31 10:23:54.427673 14486 17310 D PhotoTileAdapter: release, id=/local/item/image/70 07-31 10:23:54.428149 24286 24306 D PTC.DEVICEMGR.LocalDeviceInfoCollector: collectDeviceInfo, deviceInfo after: deviceType: PHONE, metaData: DeviceMetaData(deviceID='*(60)6923', protocolDeviceId='*(8)F47B', deviceModel=RMX3800),resourceModelId=null), spec: DeviceSpec(deviceName=**3800, resolution=1264*2780, screenDpi=560, cpuName=SM8650, ramSpec=16.00, romSpec=512.00, batteryCapacity=5800.0, bdMac=, androidVersion=36, osVersion=37, brand=realme, region=zh-CN, marketName=RMX3800, oaid='), status: DeviceStatus(connectionToMajor=null, btStatus=0, networkType=WIFI, wifiStatus=1, wifiApStatus=0, p2pStatus=0, d2dStatus=1, locationStatus=1, memAvail=7595.2188, memTotal=15204.164, storageAvail=473295.53, darkMode=0, earPhone=0, supportResumeSenselessStatus=1) 07-31 10:23:54.428178 24286 24306 D PTC.DEVICEMGR.LocalDeviceInfoProcessorImpl: getLocalDeviceInfoInTime, post:deviceType: PHONE, metaData: DeviceMetaData(deviceID='*(60)6923', protocolDeviceId='*(8)F47B', deviceModel=RMX3800),resourceModelId=null), spec: DeviceSpec(deviceName=**3800, resolution=1264*2780, screenDpi=560, cpuName=SM8650, ramSpec=16.00, romSpec=512.00, batteryCapacity=5800.0, bdMac=, androidVersion=36, osVersion=37, brand=realme, region=zh-CN, marketName=RMX3800, oaid='), status: DeviceStatus(connectionToMajor=null, btStatus=0, networkType=WIFI, wifiStatus=1, wifiApStatus=0, p2pStatus=0, d2dStatus=1, locationStatus=1, memAvail=7595.2188, memTotal=15204.164, storageAvail=473295.53, darkMode=0, earPhone=0, supportResumeSenselessStatus=1) 07-31 10:23:54.428386 24286 24306 D BluetoothAdapter: 116324037: getState(). Returning OFF 07-31 10:23:54.428493 24286 24345 D PTC.DEVICEMGR.LocalDeviceInfoPublisher: publish : deviceType: PHONE, metaData: DeviceMetaData(deviceID='*(60)6923', protocolDeviceId='*(8)F47B', deviceModel=RMX3800),resourceModelId=null), spec: DeviceSpec(deviceName=**3800, resolution=1264*2780, screenDpi=560, cpuName=SM8650, ramSpec=16.00, romSpec=512.00, batteryCapacity=5800.0, bdMac=, androidVersion=36, osVersion=37, brand=realme, region=zh-CN, marketName=RMX3800, oaid='), status: DeviceStatus(connectionToMajor=null, btStatus=0, networkType=WIFI, wifiStatus=1, wifiApStatus=0, p2pStatus=0, d2dStatus=1, locationStatus=1, memAvail=7595.2188, memTotal=15204.164, storageAvail=473295.53, darkMode=0, earPhone=0, supportResumeSenselessStatus=1) 07-31 10:23:54.428798 14486 14486 D ParasiticLifecycle: [handleLifecycleChanged] current state: CREATED, incoming event: ON_DESTROY, need renew lifecycle: false 07-31 10:23:54.428865 14486 14486 D PhotoPager: [onLifecycleChanged] state: DESTROYED event: ON_DESTROY 07-31 10:23:54.428884 14486 14486 D WindowLoadingStrategy: [notifyLifeCycleChanged] lifecycleState=DESTROYED, lifecycleEvent=ON_DESTROY 07-31 10:23:54.428986 14486 14486 D WindowLoadingStrategy: [doUpdateSlotStates] slidingWindow=(slidingLimit=144, focus=76, offsetLimit=3, capacity=7, window=73..79, windowSize=7) 07-31 10:23:54.429017 14486 14486 D PhotoSlotLoadingProxy: [shouldCacheData(CACHE_DATA)] ┏━━ start: slot=null, canceled=null, viewData=null ━━┓ 07-31 10:23:54.429035 14486 14486 D PhotoSlotLoadingProxy: [shouldCacheData(CACHE_DATA)] ┗━━ finish: slot=null, canceled=null, viewData=null ━━┛ 07-31 10:23:54.429103 14486 14486 D OneTouchShareController: [onStateChanged] source = PhotoFragment{8fabf66} (0c532ff2-9d65-4a69-8059-971989324cd7 id=0x7f0a0466 tag=com.oplus.gallery.photo_page.ui.PhotoFragment) , event = ON_DESTROY 07-31 10:23:54.429467 24286 24306 D PTC.SERVICE.NfcEventExcludeManager: get local nfc exclude event list [] 07-31 10:23:54.429611 24286 24306 D PTC.DISC.LocalDeviceId: localProtocolDeviceId, get from cached: *(8)F47B 07-31 10:23:54.429677 14486 14486 W DataAbility.DataSessionImpl: [unregisterContentChangedListener] unregister listener, dataKey:DataKey(dataType=/Local/TimelineAlbum, extras=Bundle[{media-item-path=/local/item/image/70, shared_id=ce572d8d-b397-4e72-b281-13a0c79e6e1a, is_support_revert_order=true, key_statusbar_tint=true, has_pre_transition=true, key_crop=1x1:1, index-hint=76, media_model_type=/Local/TimelineAlbum, key_view_revert=false, path_str=/local/album/timeline/any, media-set-path=/local/album/timeline/any, key_enter_photo_animate=true, current_page=timeline_page, open-animation-rect=Rect(254, 1088 - 505, 1339), key_view_type=-1:1, position_controller=134258630}], scope=scope_global), listener:com.oplus.aiunit.vision.vxc@c00117c 07-31 10:23:54.429731 24286 24306 D PTC.SERVICE.NfcApduDataBuilder: -- NFC-DISC -- build-payload: 03080810201A1135343A39413A38463A44463A34313A343228013801480352080A06E64A1C11F47B 07-31 10:23:54.429735 14486 14486 D LOADTASK.AbsLoadTaskDispatcher: [releaseExecutor] key=Photo263713973 07-31 10:23:54.429786 24286 24306 D PTC.SERVICE.ShareDiscovery: -- SHARE-DISC -- startAdvertise advertiseOption: ServiceAdvertisingOptions(discoveryStrategy=NFC, discoverableDeviceLevel=ALL, discoverableServiceUser=PRIVATE, wakeup=Wakeup(componentType=1, pkg=com.heytap.accessory, action=com.oplus.interconnect.service.TAP_SHARE_DISCOVERY), serviceData=[3, 8, 8, 16, 32, 26, 17, 53, 52, 58, 57, 65, 58, 56, 70, 58, 68, 70, 58, 52, 49, 58, 52, 50, 40, 1, 56, 1, 72, 3, 82, 8, 10, 6, -26, 74, 28, 17, -12, 123]) 07-31 10:23:54.429830 14486 14486 D LOADTASK.AbsLoadTaskManager: unregister taskOwner:Photo, after taskOwners:[com.oplus.gallery.framework.abilities.caching.xqip.i@a1fe0d3, TabFragment{2776789} (23e4987f-c18a-46ff-9daf-2795a700c908 id=0x7f0a01b3 tag=com.coloros.gallery3d.app.tab.TabFragment), com.oplus.gallery.timelinepage.TimelineTabViewModel@9be3b62, com.oplus.gallery.albumsetpage.allalbum.viewmodel.MainTabAlbumSetViewModel@7788152, com.oplus.gallery.albumsetpage.shortcutalbum.ShortcutAlbumSetViewModel@6a6f3fb, com.oplus.gallery.albumsetpage.allalbum.viewmodel.MyAlbumSetViewModel@238d8c, com.oplus.gallery.albumsetpage.picked.viewmodel.PickedAlbumSetViewModel@17d90c1, com.oplus.gallery.albumsetpage.allalbum.viewmodel.MoreAlbumSetViewModel@7155a6d] 07-31 10:23:54.429838 24286 24306 I PTC.SDK.DiscoveryImpl: startAdvertising, serviceId, tap_share 07-31 10:23:54.429871 14486 14486 W DataAbility.DataSessionManagerImpl: [closeSession] close session, session:com.oplus.aiunit.vision.fz3@327606f 07-31 10:23:54.429904 14486 14486 W DataAbility.DataSessionImpl: [close] data session close, dataKey:DataKey(dataType=/Local/TimelineAlbum, extras=Bundle[{media-item-path=/local/item/image/70, shared_id=ce572d8d-b397-4e72-b281-13a0c79e6e1a, is_support_revert_order=true, key_statusbar_tint=true, has_pre_transition=true, key_crop=1x1:1, index-hint=76, media_model_type=/Local/TimelineAlbum, key_view_revert=false, path_str=/local/album/timeline/any, media-set-path=/local/album/timeline/any, key_enter_photo_animate=true, current_page=timeline_page, open-animation-rect=Rect(254, 1088 - 505, 1339), key_view_type=-1:1, position_controller=134258630}], scope=scope_global) 07-31 10:23:54.429936 14486 14486 W DataAbility.DataModelGateway: [unregisterContentChangedListener] unregister listener, id:DataKey(dataType=/Local/TimelineAlbum, extras=Bundle[{media-item-path=/local/item/image/70, shared_id=ce572d8d-b397-4e72-b281-13a0c79e6e1a, is_support_revert_order=true, key_statusbar_tint=true, has_pre_transition=true, key_crop=1x1:1, index-hint=76, media_model_type=/Local/TimelineAlbum, key_view_revert=false, path_str=/local/album/timeline/any, media-set-path=/local/album/timeline/any, key_enter_photo_animate=true, current_page=timeline_page, open-animation-rect=Rect(254, 1088 - 505, 1339), key_view_type=-1:1, position_controller=134258630}], scope=scope_global), listener:com.oplus.aiunit.vision.hk0@2bd974e 07-31 10:23:54.429955 14486 14486 W DataAbility.DataModelGateway: [close] data model gateway unregister listener, dataKey:DataKey(dataType=/Local/TimelineAlbum, extras=Bundle[{media-item-path=/local/item/image/70, shared_id=ce572d8d-b397-4e72-b281-13a0c79e6e1a, is_support_revert_order=true, key_statusbar_tint=true, has_pre_transition=true, key_crop=1x1:1, index-hint=76, media_model_type=/Local/TimelineAlbum, key_view_revert=false, path_str=/local/album/timeline/any, media-set-path=/local/album/timeline/any, key_enter_photo_animate=true, current_page=timeline_page, open-animation-rect=Rect(254, 1088 - 505, 1339), key_view_type=-1:1, position_controller=134258630}], scope=scope_global),listener:com.oplus.aiunit.vision.cy3@f9dad02 07-31 10:23:54.429981 24286 24306 D PTC.SERVICE.TapShareManager: -- SHARE-DISC -- unregisterDiscoveryOption: com.coloros.gallery3d 07-31 10:23:54.429995 14486 14486 W DataAbility.ShareSessionManagerImpl: [closeSession] close session, session:com.oplus.aiunit.vision.g0h@49b8e20 07-31 10:23:54.430008 14486 14486 W DataAbility.ShareSessionImpl: [close] close share session, id:ce572d8d-b397-4e72-b281-13a0c79e6e1a 07-31 10:23:54.430025 14486 14486 W DataAbility.ShareSessionImpl: [close]share session is close! should not close is again, id:ce572d8d-b397-4e72-b281-13a0c79e6e1a, payload:Snapshot(version=0, totalCount=145, indexRange=76..76) 07-31 10:23:54.430044 14486 14486 W PhotoDataLoadingViewModel: [notifyLifeCycleChanged] new event : ON_DESTROY 07-31 10:23:54.430057 14486 14486 W FrequencyCalculator: [notifyStateEvent] stateEvent:LifecycleEvent(event=ON_DESTROY) 07-31 10:23:54.430063 14486 14486 W FrequencyCalculator: [updateFrequencyState] stateEvent:LifecycleEvent(event=ON_DESTROY) 07-31 10:23:54.430072 14486 14486 W FrequencyCalculator: [updateDebounceTime] stateEvent:LifecycleEvent(event=ON_DESTROY) debounceTime:0 frequencyState:FORBID_FREQUENCY_BY_TIME 07-31 10:23:54.430085 14486 14486 W DataLoadingDecider: [updateDataLoadingState]event dispatched : LifecycleEvent(event=ON_DESTROY) , new state : DataLoadingState(lifecycleEvent=ON_DESTROY, dataLoadingMode=ReloadInForeground, focus=76, dataRange=0..140, totalCount=145, pendingLoadState=hasPendingCreateFocusHint : false , hasPendingResumeFocusHint : false , hasPendingReload : false) , old state : DataLoadingState(lifecycleEvent=ON_DESTROY, dataLoadingMode=ReloadInForeground, focus=76, dataRange=0..140, totalCount=145, pendingLoadState=hasPendingCreateFocusHint : false , hasPendingResumeFocusHint : false , hasPendingReload : false) 07-31 10:23:54.430366 14486 22232 D INTER_SHARE.SDK.ShareClient: sealedResult: 0 07-31 10:23:54.430412 14486 22232 I INTER_SHARE.SDK.ServiceConnectivityImpl: unbindService 07-31 10:23:54.430413 24286 24445 I PTC.SDK.AgentsRegisterImpl: register agents: agentId: "accept-tap_share(wakeup)" pkg: "com.heytap.accessory" pid: 24286 appName: "\350\256\276\345\244\207\345\277\253\350\277\236" channelName: "tap_share" 高通定屏日志解释与分析

filetype

如下报错,如何解决 In file included from src/SM2.cc:1: In file included from src/SM2.h:3: In file included from incs/gmp.h:34: In file included from /home/lzw/ohos-sdk/linux/native/llvm/include/c++/v1/iosfwd:99: In file included from /home/lzw/ohos-sdk/linux/native/llvm/include/c++/v1/__mbstate_t.h:29: /home/lzw/ohos-sdk/linux/native/llvm/include/c++/v1/wchar.h:141:77: error: use of undeclared identifier 'wcschr' wchar_t* __libcpp_wcschr(const wchar_t* __s, wchar_t __c) {return (wchar_t*)wcschr(__s, __c);} ^ /home/lzw/ohos-sdk/linux/native/llvm/include/c++/v1/wchar.h:148:87: error: use of undeclared identifier 'wcspbrk' wchar_t* __libcpp_wcspbrk(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcspbrk(__s1, __s2);} ^ /home/lzw/ohos-sdk/linux/native/llvm/include/c++/v1/wchar.h:155:78: error: use of undeclared identifier 'wcsrchr'; did you mean 'wcschr'? wchar_t* __libcpp_wcsrchr(const wchar_t* __s, wchar_t __c) {return (wchar_t*)wcsrchr(__s, __c);} ^ /home/lzw/ohos-sdk/linux/native/llvm/include/c++/v1/wchar.h:143:16: note: 'wcschr' declared here const wchar_t* wcschr(const wchar_t* __s, wchar_t __c) {return __libcpp_wcschr(__s, __c);} ^ /home/lzw/ohos-sdk/linux/native/llvm/include/c++/v1/wchar.h:162:86: error: use of undeclared identifier 'wcsstr'; did you mean 'wcschr'? wchar_t* __libcpp_wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcsstr(__s1, __s2);} ^ /home/lzw/ohos-sdk/linux/native/llvm/include/c++/v1/wchar.h:145:16: note: 'wcschr' declared here wchar_t* wcschr( wchar_t* __s, wchar_t __c) {return __libcpp_wcschr(__s, __c);} ^ /home/lzw/ohos-sdk/linux/native/llvm/include/c++/v1/wchar.h:162:86: error: no matching function for call to 'wcschr' wchar_t* __libcpp_wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcsstr(__s1, __s2);} ^ /home/lzw/ohos-sdk/linux/native/llvm/include/c++/v1/wchar.h:145:16: note: candidate disabled: <no message provided> wchar_t* wcschr( wchar_t* __s, wchar_t __c) {return __libcpp_wcschr(__s, __c);} ^ /home/lzw/ohos-sdk/linux/native/llvm/include/c++/v1/wchar.h:162:93: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'const wchar_t *' wchar_t* __libcpp_wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcsstr(__s1, __s2);} ^~~~ /home/lzw/ohos-sdk/linux/native/llvm/include/c++/v1/wchar.h:145:38: note: passing argument to parameter '__s' here wchar_t* wcschr( wchar_t* __s, wchar_t __c) {return __libcpp_wcschr(__s, __c);}

资源评论
用户头像
张盛锋
2025.04.20
在Linux和Windows系统上均有良好的兼容性,通过编译和环境配置步骤,支持直接使用或者进行源码定制。
用户头像
AshleyK
2025.02.24
简单实用的Java版本SM4加密算法SDK,包含关键的密钥生成和格式转换功能,适用于多种平台,便于开发者集成使用。🐬
用户头像
杜拉拉到杜拉拉
2025.02.10
无论是生成密钥还是格式转换,该SDK都提供了丰富的工具函数,使得在Java环境中处理SM4算法变得轻而易举。
用户头像
西门镜湖
2025.02.08
文档清晰介绍了如何基于gmssl进行扩展,为Java开发者提供了便捷的接口封装,有助于提升开发效率。🐕
用户头像
正版胡一星
2025.01.18
开源项目中少有的针对SM4算法的Java实现,具有较高的参考价值和实用性,适合需要进行加密通信的场景。💖
用户头像
兰若芊薇
2024.12.30
对于想要快速实现GMSSL加解密功能的开发者来说,这个开源SDK是一个非常不错的选择。
weixin_38530995
  • 粉丝: 0
上传资源 快速赚钱